﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Market.BLL;
using Market.Model;

namespace Market
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        MyBLL manager = new MyBLL();
        private void btn_login_Click(object sender, EventArgs e)
        {
            string name = tb_username.Text.ToString();
            string pass = tb_userpass.Text.ToString();
            UserInfo info = manager.LogIn(name,pass);
            if (info == null)
            {
                MessageBox.Show("登录失败");
            }
            else
            {
                string INFO = string.Format(@"用户编号为：{0}
用户名为：{1}
密码为：{2}",info.UserNo,info.UserName,info.UserPass);
                MessageBox.Show(INFO);
            }
        }
    }
}
